package com.minivision.fdiot.service;

import java.util.List;

import com.minivision.fdiot.rest.param.detect.SearchsParam;
import com.minivision.fdiot.rest.result.detect.SearchOneResult;
import org.springframework.web.multipart.MultipartFile;

import com.minivision.fdiot.entity.Face;
import com.minivision.fdiot.exception.FacePlatException;
import com.minivision.fdiot.rest.param.detect.SearchParam;
import com.minivision.fdiot.rest.result.detect.CompareResult;
import com.minivision.fdiot.rest.result.detect.DetectedFace;
import com.minivision.fdiot.rest.result.detect.SearchResult;

public interface FaceService {

  public Face saveFace2Cache(MultipartFile img, DetectedFace detectedFace) throws FacePlatException;

  public DetectedFace detectOneFace(byte[] img) throws FacePlatException;

  public float[] getFeatures(byte[] img) throws FacePlatException;

  public List<DetectedFace> detect(byte[] img) throws FacePlatException;

  public List<DetectedFace> detect(byte[] img, boolean attributes) throws FacePlatException;

  public List<DetectedFace> getFaceAttribute(byte[] img) throws FacePlatException;

  public CompareResult compare(String faceToken1, String faceToken2, byte[] img1, byte[] img2)
      throws FacePlatException;

  public SearchResult search(SearchParam param) throws FacePlatException;

  /**
   * Description: searchs(for srs)<br>
   *
   * @author guming <br>
   * @taskId
   * @param <br>
   * @return <br>
   */
  public SearchOneResult searchOne(SearchsParam param) throws FacePlatException;
}
